package com.movitech.mobile.cz.base.purchase.service;

import com.baomidou.mybatisplus.service.IService;
import com.movitech.mobile.cz.base.common.util.PageCode;
import com.movitech.mobile.cz.base.modules.controller.RestReturnResult;
import com.movitech.mobile.cz.base.purchase.bizvo.SpecialPurchasePlanListResponseVO;
import com.movitech.mobile.cz.base.purchase.entity.PSpecialPurchasePlan;
import com.movitech.mobile.cz.base.purchase.entity.ext.ExtPSpecialPurchasePlan;
import com.movitech.mobile.cz.base.purchase.entity.ext.PSpecialPurchasePlanFindRequest;
import com.movitech.mobile.cz.base.purchase.entity.ext.PSpecialPurchasePlanSaveRequestVO;

import java.util.List;

/**
 * <p>
 * 专项采购计划 服务类
 * </p>
 *
 * @author Movitech Mobile
 * @since 2018-03-08
 */
public interface PSpecialPurchasePlanService extends IService<PSpecialPurchasePlan> {

    PageCode findSpecialPurchasePlanList(PSpecialPurchasePlanFindRequest pSpecialPurchasePlan) throws Exception;

    ExtPSpecialPurchasePlan getSpecialPurchasePlanById(String specialPurchasePlanId);

    RestReturnResult saveSpecialPurchasePlan(PSpecialPurchasePlanSaveRequestVO pSpecialPurchasePlanSaveRequestVO);

    String getNewPlansByProjectId(String project_id);

    List<ExtPSpecialPurchasePlan> selectPSpPlanUnConfirmProjects();

    void deleteById(String id);
    
    /**
     * 新增专项采购计划
     * @param pSpecialPurchasePlan
     * @return
     */
    boolean addPSpecialPurchasePlan(PSpecialPurchasePlan pSpecialPurchasePlan);
    
    /**
     * 更新专项采购计划
     * @param pSpecialPurchasePlan
     * @return
     */
    boolean updatePSpecialPurchasePlan(PSpecialPurchasePlan pSpecialPurchasePlan);

    /**
     * 获取专项采购计划确认项目列表
     * @return
     */
	RestReturnResult getConfirmedProjects(String companyId);

    List<SpecialPurchasePlanListResponseVO> findSpecialPurchasePlanListNoPage(PSpecialPurchasePlanFindRequest pSpecialPurchasePlan);

    List<PSpecialPurchasePlan> findByIds(String[] ids);

    void updateChangeTime(String[] planIds);
}
